# load required libs
require(plotrix)
# Read files
Norm25 <- read.table("norm200.csv", header=TRUE)
Norm25P <- read.table("norm200p.csv", header=TRUE)
# Define data and boundaries
maxCycles <- 200000
yAxisMarks <- c(0, round(0.5*maxCycles), round(maxCycles))
colors <- c("lightblue","blue")
# Save our graph
#png("histogram25.png", res=50)
postscript("histogram200.ps")
# Histogram (25 Tasks)
data1<-hist(rbind(Norm25$Task),plot=FALSE,breaks=0:199)$counts
data2<-hist(rbind(Norm25P$Task),plot=FALSE,breaks=0:199)$counts
barp(rbind(data1, data2), col=colors) 
abline(h=yAxisMarks, col="gray", lwd=0.5)
# Print the legend
legend("topright",inset=.05, title="Cycles per Task", c("With Priority", "Without Priority"), fill=colors)
# Switch the device off to get a safe instance end
dev.off()

